var express=require('express');

var router=express.Router();  /*使用express.Router()类创建模块化，可挂载的路由句柄*/

// 后台

var backPublic = require('./backstage/backPublic.js');

var backIndex = require('./backstage/backIndex.js');  //普通用户管理

var business = require('./backstage/business.js');// 管理

var appraiser = require('./backstage/appraiser.js');  //评测师管理

var appraisal = require('./backstage/appraisal.js');  //评测管理

var note = require('./backstage/note.js');  //帖子管理

var information = require('./backstage/information.js');  //信息

router.use('/backPublic',backPublic);

router.use('/backIndex',backIndex);

router.use('/business',business);

router.use('/appraiser',appraiser);

router.use('/appraisal',appraisal);

router.use('/note',note);

router.use('/information',information);


//最终路由
router.get('/',function (req,res) {
    res.render('app/index');
})
//如果以上 不存在，则会走下面这个
router.use("/",function(req,res){
    res.send("admin");
})

module.exports = router; /*模块化暴露*/
